package com.system.service;

import com.system.dao.DaoFactory;
import com.system.dao.UserDao;
import com.system.json.JsonContext;

import net.sf.json.JSONObject;

public class UserService {
	private DaoFactory factory = DaoFactory.getInstance();
	private JsonContext context = new JsonContext();
	
	public JSONObject checkoutdeleteUser(String username){
		UserDao userDao=factory.createUserDao();
		boolean res=userDao.deleteUser(username);
		if(res)
			return context.getSuccessObject("删除成功", null, null);
		else{
			return context.getFailedObject("删除失败");
		}
	}
}
